/**
 * 
 */
package org.cuatrovientos.es;

import java.util.Scanner;

/**
 *  Class to draw Squares in console 6 Square
 * @author daniel_ancin
 *
 */
public class Square {
	
	private char character;
	
	
	/**
	 * default Constructor
	 */
	public Square(){
		character = '#';
}
	/**
	 * constructor with character argument
	 * @param character
	 */
	public Square(char character){
		this.character = character;
}
	/**
	 * set a another character
	 * @param character
	 */
	public void setCharacter (char character){
		this.character = character;
		
	}
	
/**
 * generate a String
 * @param sice
 * @return
 */
	private  String generate (int size){
		String result="";
		
		for (int i =0; i<size; i++){
			for (int j =0; j<size; j++){
				result= result + "\n";
			}
		}
		
		return result;
		
	}
		/**
		 * creates a square on console
		 * @param size
		 */
		
		public void create (int size) {
			String square = generate(size);
			System.out.println(square);
		}		
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Square mySquare = new Square();
		Square otherSquare = new Square('x');
		mySquare.create(66);
		
		
		//call Square methods
		mySquare.setCharacter('*');
		mySquare.create(6);
		

}
}

